package com.zhuss.core.information;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.core.information.DetailInformationBo;
import com.zhuss.bean.bo.core.information.SearchInformationBo;
import com.zhuss.common.ReadService;
import com.zhuss.core.processor.InformationRead;
import com.zhuss.exception.DzcxException;

/**
 * @description: 通知公告查询Service
 * @author: zhushanshuo
 * @create: Tue Feb 02 15:16:28 CST 2021
 **/
@Component("informationReadService")
public class InformationReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("informationRead")
	private InformationRead informationRead;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws DzcxException {
		DetailInformationBo bo = (DetailInformationBo) param;
		Long informationId = bo.getInformationId();
		Object vo = informationRead.detail(informationId);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchInformationBo bo = (SearchInformationBo) param;
		Object result = informationRead.list(bo);
		return result;
	}
	
}

